#!/usr/bin/env python
# encoding: utf-8
'''
@author: wangjianrong
@software: pycharm
@file: read_img.py
@time: 2020/9/22 9:53
@desc:读写中文路径图片
'''

import cv2
import numpy as np


def cv_imread(filePath,flags=-1):
    cv_img = cv2.imdecode(np.fromfile(filePath,dtype=np.uint8),flags)
    return cv_img

def cv_imwrite(filePath,img):
    cv2.imencode('.png', img)[1].tofile(filePath)